const { contextBridge , ipcRenderer } = require('electron')

contextBridge.exposeInMainWorld('electronAPI', {
    openFile: () => ipcRenderer.invoke('dialog:openFile'),
    openFiles: () => ipcRenderer.invoke('dialog:openFiles'),
    isTask:(v=0)=>{
        if(v !== 0){
            this._isTask=v;
        }
        return this._isTask
    },
    mainImg:(v)=>{
        if(v){
            this._mainImg=v;
        }
        return this._mainImg
    },
    imgs:(v)=>{
        if(v){
            this._imgs=v;
        }
        return this._imgs
    },
    TaskStart: (mainImg,imgs) => ipcRenderer.invoke('dialog:TaskStart',mainImg,imgs),
    
});